<template>
  <div id="app">
    <dv-loading v-if="loading">加载中...</dv-loading>
    <router-view  v-else />
  </div>
</template>
<script>
export default {
  name: 'App',
  data () {
    return {
      loading: false
    }
  },
  created () {
    this.init()
  },
  mounted () {
    this.changeSize()
  },
  methods: {
    init () {
      this.loading = true
      setTimeout(() => {
        this.loading = false
      }, 1500)
    },
    changeSize () {
      window.onresize = () => {
        this.init()
      }
    }
  }
}
</script>

<style lang="less">
@import '../src/assets/less/common.less';
@import '../src/assets/less/scrollbar.less';
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #ccc;
  width: 100%;
  .dv-loading {
    height: 800px;
  }
}
</style>
